package com.bw.zhuangao5___day002.UI.Reister;

import androidx.fragment.app.FragmentActivity;

import com.bw.mvp.P.BannerPretenter;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

/**
 * create by ertu
 * create on 2021/9/13
 * description
 */
public class ReisterPretenter  extends BannerPretenter<ReisterContion.reisterview,ReisterContion.reistermodel> {
    Disposable disposable;

    public ReisterPretenter(ReisterContion.reisterview view, ReisterContion.reistermodel model) {
        super(view, model);
    }


    public void dogetreister(String zhang,String mi)
    {
        model.getreistermodel(zhang, mi, new Observer<ReisterClass>() {
            @Override
            public void onSubscribe(Disposable d) {
                disposable=d;
            }

            @Override
            public void onNext(ReisterClass reisterClass) {
                view.getreisterview(reisterClass);
            }

            @Override
            public void onError(Throwable e) {
                disposable.isDisposed();
            }

            @Override
            public void onComplete() {
                disposable.isDisposed();
            }
        });
    }
}
